#if !defined(AFX_INTERFACEDLG_H__8BC9BC4A_9DD4_4058_A695_EC347AC4CC2D__INCLUDED_)
#define AFX_INTERFACEDLG_H__8BC9BC4A_9DD4_4058_A695_EC347AC4CC2D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// InterfaceDlg.h : header file
//

const int DEF_WS_EX_LAYERED					= 0x00080000;
const int DEF_LWA_COLORKEY					= 0x00000001;
const int DEF_LWA_ALPHA						= 0x00000002;
const int DEF_ULW_COLORKEY					= 0x00000001;
const int DEF_ULW_ALPHA						= 0x00000002;
const int DEF_ULW_OPAQUE					= 0x00000004;

/////////////////////////////////////////////////////////////////////////////
// CInterfaceDlg dialog
#include "Util\MinButton.h"
#include "Util\MinLabel.h"

class IM2MInterface;
class IIO;
class IPIO;
class IAutoManager;
class CMoldingOHTDoc;

const int MAX_INTERFACE_DLG_COUNT = 16;

class CInterfaceDlg : public CDialog
{
private:
	int m_nCVIndex;
	IM2MInterface* m_lnkM2MInterface;
	char **m_szBtnName;
	IAutoManager* m_lnkAutoManager;
	IPIO* m_lnkPIO;
	CMoldingOHTDoc* m_pDoc;

	int m_nOutStatus[MAX_INTERFACE_DLG_COUNT];
	int m_nInStatus[MAX_INTERFACE_DLG_COUNT];
	int m_nOldOutStatus[MAX_INTERFACE_DLG_COUNT];
	int m_nOldInStatus[MAX_INTERFACE_DLG_COUNT];

	BOOL m_flgIntTimerInitFlag;
	BOOL m_bOutputDisable;
	UINT m_TimerID;

// Construction
public:
	void StatusDisplay();
	void OnSelectCV(int index);
	CInterfaceDlg(IM2MInterface** pM2MInterface, char **szBtnName,  BOOL bOutputDisable=FALSE, CWnd* pParent = NULL);   // standard constructor

	char m_strGetTmp[100];
	char m_strTmp[100];

	CMinLabel m_sPos[MAX_INTERFACE_DLG_COUNT];
	CMinButton m_bBtn[MAX_INTERFACE_DLG_COUNT];

	CMinButton m_btnCV[2];

// Dialog Data
	//{{AFX_DATA(CInterfaceDlg)
	enum { IDD = IDD_INTERFACEDLG_DIALOG };
	CMinButton	m_btnExit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CInterfaceDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CInterfaceDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	virtual void OnCancel();
	afx_msg void OnInterfacePioBtn1();
	afx_msg void OnInterfacePioBtn2();
	afx_msg void OnInterfacePioBtn3();
	afx_msg void OnInterfacePioBtn4();
	afx_msg void OnInterfacePioBtn5();
	afx_msg void OnInterfacePioBtn6();
	afx_msg void OnInterfacePioBtn7();
	afx_msg void OnInterfacePioBtn8();
	afx_msg void OnInterfaceMoldingBtn1();
	afx_msg void OnInterfaceMoldingBtn2();
	afx_msg void OnInterfaceMoldingBtn3();
	afx_msg void OnInterfaceMoldingBtn4();
	afx_msg void OnInterfaceMoldingBtn5();
	afx_msg void OnInterfaceMoldingBtn6();
	afx_msg void OnInterfaceMoldingBtn7();
	afx_msg void OnInterfaceMoldingBtn8();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_INTERFACEDLG_H__8BC9BC4A_9DD4_4058_A695_EC347AC4CC2D__INCLUDED_)
